package service

import (
	"irisdemo/db"
)

var User = newUserService()

type userService struct {
}

func newUserService() *userService {
	return &userService{}
}

func (s *userService) Login(uname, passwd string) bool {

	//调用db
	user, err := db.User.Login(uname, passwd)

	if err != nil {
		return false
	}

	if user == nil {
		return false
	}

	//用户登录成功 开始写session

	return true
}
